package com.itheima.controller;

import com.itheima.pojo.OmsOrderSetting;
import com.itheima.service.OmsOrderSettingService;
import com.itheima.vo.MinioVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 芝士雪豹
 * @create 2022/10/15/19:42
 */
@RestController
@RequestMapping("/orderSetting")
public class OmsOrderSettingController {
    @Autowired
    private OmsOrderSettingService service;

    //获取指定订单设置
    @GetMapping("/{id}")
    public MinioVo findOne(@PathVariable Integer id) {
        MinioVo vo = service.findOne(id);
        return vo;
    }
    //修改指定订单设置
    @PostMapping("/update/{id}")
    public MinioVo update(@PathVariable Integer id, @RequestBody OmsOrderSetting dto) {
        MinioVo vo = service.update(id, dto);
        return vo;
    }


}
